<template>
	<view>
		<u-navbar leftText="返回" title="详情">
			<view class="u-nav-slot" slot="left">
				<view class="navbar-left " @click="goBack">
					<u-icon name="arrow-left" size="16"></u-icon>	
					<span>返回</span>
				</view>
			</view>
		</u-navbar>
		<u-sticky>
			<u-tabs :list="tabList" lineColor="#264AA2" lineWidth="60rpx" :activeStyle="{color: '#264AA2',fontSize: '30rpx',fontFamily:'PingFang SC',fontWeight: '500' }"
				:inactiveStyle="{color: '#1F1F1F',fontSize: '30rpx',fontFamily:'PingFang SC',fontWeight: '500'}" :scrollable="false"
			    @click="tabClick" >
			</u-tabs>
		</u-sticky>
		
		<uniFlowBase v-if="key == 0" :isEdit="false" :type="2" :applyid="applyid" :taskid="taskid" :formid="formid" :stepid="stepid" :applyid_bs="applyid_bs" :processinstanceid="processinstanceid"></uniFlowBase>
		<uniFlowRecord v-else :processinstanceid="processinstanceid"></uniFlowRecord>
	</view>
</template>

<script>
	import uniFlowBase from '@/components/uniFlowCase/uniFlowBase';
	import uniFlowRecord from '@/components/uniFlowCase/uniFlowRecord';
	export default {
		components:{
			uniFlowBase,
			uniFlowRecord
		},
		data() {
			return {
				tabList: [{
					name: '基本信息',
					key: 0,
				}, {
					name: '办理记录',
					key: 1,
				}],
				key: 0,
				// 流程办理记录
				stepList: [
					{
						id: '0',
						step: '0',
						stepText: '行政复议-受理-受理',
						dealName: '龚欢',
						advice: '行政复议',
						content: '意见意见意见意见意见意见一件一件意见意见意见意见意见意见一件一件'
					},
					{
						id: '1',
						step: '1',
						stepText: '行政复议-受理',
						dealName: '龚欢',
						advice: '行政复议',
						content: '意见意见意见意见意见意见一件一件意见意见意见意见意见意见一件一件'
					},
					{
						id: '2',
						step: '2',
						stepText: '行政复议-审理',
						dealName: '李国水',
						advice: '行政复议',
						content: '意见意见意见意见意见意见一件一件意见意见意见意见意见意见一件一件'
					}
				],
				applyid: '',
				taskid: '',
				formid: '',
				applyid_bs: '',
				stepid: '',
				processinstanceid: ''
			}
		},
		onLoad: function(option){
			
			this.applyid = option.applyid
			this.taskid = option.taskid
			this.formid = option.formid
			this.applyid_bs = option.applyid_bs
			this.processinstanceid = option.processinstanceid	
		},
		methods: {
			goBack() {
				uni.navigateTo({
					url:"/pages/approve/done/doneList",
				});
			},
			tabClick(item) {
				this.key = item.key
			},
			
		}
	}
</script>

<style lang="scss" scoped>
	/deep/ .u-tabs__wrapper__nav {
		background-color: #f5f5f5;
	}	
</style>
